async function validAlways1() {
  try {
    return await Promise.resolve('try');
  } catch (e) {}
}

async function validAlways3() {
  return 'value';
}

async function test() {
  try {
    return await Promise.resolve(1);
  } catch (e) {
    return await Promise.resolve(2);
  } finally {
    console.log('cleanup');
  }
}

declare function foo(): Promise<boolean>;

function bar(baz: boolean): Promise<boolean> | boolean {
  if (baz) {
    return true;
  } else {
    return foo();
  }
}